#pragma once
#include <list>
enum EventType { NewIO, TransferReady, DataTransfer, EndIO, BusyLink, NullEvent};
class Event
{
private:
	const EventType		_type;			// type of event
	double				_startTime;		// the time that the event started
	double				_actionTime;	// actual time of execution
	double				_endTime;		// end time of event
	int					_sizeOfEvent;	// in block
	std::list<Event*>	_causalEvents;	// causal events
public:
	Event(EventType type);
	~Event(void);

	EventType getType() const { return _type; }
	double getStartTime() const { return _startTime; }
	double getActionTime() const { return _actionTime; }
	double getEndTime() const { return _actionTime; }
	double getSizeOfEvent() const { return _sizeOfEvent; }
	bool operator< (const Event& other);
	bool operator<= (const Event& other);
	bool operator> (const Event& other);
	bool operator>= (const Event& other);
	bool operator==(const Event& other);
	

	void doAction();

};

